home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16282 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 9 Apr 1996 19:16:59 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4kf5mrINN47r@keats.ugrad.cs.ubc.ca>
  8. References: <JSA.96Feb16135027@organon.com> <dewar.829048603@schonberg> <4kdspcINN6ct@keats.ugrad.cs.ubc.ca> <dewar.829079393@schonberg>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <dewar.829079393@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
  12. >Kazimir has now moved on to (perfectly reasonable) discussions of
  13. >sound programming practices, with which I of course do not disagree.
  14. >
  15. >But that was not what caused me to raise the read issue in the first
  16. >place. I used it merely as an example of a portability problem caused
  17. >by an unclear specification. Seems to me that Kazimir's failure to 
  18. >find anything approximating a clear spec, and talk of unwritten
  19. >rules, means he agrees wit me :-)
  20.  
  21. Right. The discussion was not of programming practices, but of implementation.
  22. I think this sums it up:
  23.  
  24. Seebach and Myself: in the absence of clarity in a standard, as a programmer
  25. follow the best rational inference to the safest/weakest assumption; program
  26. defensively. Then you don't have to worry about which choice is made in the
  27. implementation.
  28.  
  29. Dewar: in the absence of clarity in a standard, as an implementor, follow the
  30. pack. Look at what most implementations do, and stick to the unwritten
  31. standards of the community.
  32.  
  33. As a programmer, if you do the former, you don't have to particularly worry
  34. whether an implementation does the latter.  For example, because I don't assume
  35. that select() will not modify the timeval structure, I don't have to care
  36. whether it does or not. 
  37.  
  38. The trouble is that the combined effect of the two motivations results in
  39. nothing being done to fix the standards. Good programmers are careful anyway,
  40. so they don't care, and those who are not careful are forgiven by most of the
  41. implementations, so they don't care (or don't even know) either. 
  42. -- 
  43.  
  44.